import request from "../../utils/request"

// 登录接口
export const login=(loginForm)=>{

    return request({
        url:'/system/user/login',
        method:'post',
        data:loginForm
    })
}

// 查询user列表
export const findUserList=(currentPage,pageSize,userVO)=>{

    return request({
        url:`/system/user/findUserList/${currentPage}/${pageSize}`,
        method:'post',
        data:userVO
    })
}

// 修改用户状态
export const updateUserStatus=(id,status)=>{
    return request({
        url:`/system/user/updateUserStatus/${id}/${status}`,
        method:'put'
    })
}


// 新增用户
export const addUser=(userVO)=>{
    return request({
        url:'/system/user/addUser',
        method:'post',
        data:userVO
    })
}


// 删除用户
export const deleteUser=(id)=>{
    return request({
        url:`/system/user/deleteUser/${id}`,
        method:'delete'
    })
}

// 查找编辑用户
export const edit=(id)=>{
    return request({
        url:`/system/user/edit/${id}`,
        method:'get'
    })
}
//编辑用户
export const updateUser=(id,userVO)=>{
    return request({
        url:`/system/user/updateUser/${id}`,
        method:'put',
        data:userVO
    })
}